Get CMS block
curl --request GET \
--url https://api.example.com/cms/blocks/{name}import requests
url = "https://api.example.com/cms/blocks/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/cms/blocks/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/cms/blocks/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/cms/blocks/{name}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/cms/blocks/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cms/blocks/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "home-hero",
"status": "ACTIVE",
"items": [
{
"id": "11111111-1111-1111-1111-111111111111",
"type": "TEXT",
"key": "headline",
"label": "Headline",
"text": "Order ahead"
},
{
"id": "22222222-2222-2222-2222-222222222222",
"type": "LIST",
"key": "banners",
"label": "Banners",
"item_type": "IMAGE",
"items": [
{
"id": "33333333-3333-3333-3333-333333333333",
"type": "IMAGE",
"url": "https://example.com/banner-1.jpg",
"alt": "Summer deal"
},
{
"id": "44444444-4444-4444-4444-444444444444",
"type": "IMAGE",
"url": "https://example.com/banner-2.jpg",
"alt": "New menu"
}
]
}
]
}
}
CMS
Get CMS block
Retrieve an ACTIVE CMS block by its reserved name for the merchant and environment.
GET
/
cms
/
blocks
/
{name}
Get CMS block
curl --request GET \
--url https://api.example.com/cms/blocks/{name}import requests
url = "https://api.example.com/cms/blocks/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/cms/blocks/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/cms/blocks/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/cms/blocks/{name}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/cms/blocks/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cms/blocks/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "home-hero",
"status": "ACTIVE",
"items": [
{
"id": "11111111-1111-1111-1111-111111111111",
"type": "TEXT",
"key": "headline",
"label": "Headline",
"text": "Order ahead"
},
{
"id": "22222222-2222-2222-2222-222222222222",
"type": "LIST",
"key": "banners",
"label": "Banners",
"item_type": "IMAGE",
"items": [
{
"id": "33333333-3333-3333-3333-333333333333",
"type": "IMAGE",
"url": "https://example.com/banner-1.jpg",
"alt": "Summer deal"
},
{
"id": "44444444-4444-4444-4444-444444444444",
"type": "IMAGE",
"url": "https://example.com/banner-2.jpg",
"alt": "New menu"
}
]
}
]
}
}
Returns one CMS block by unique
Find a slot with
See CMS for templates, blocks, and item types.
name. Use this after you reserve a name in the dashboard (for example legal-tos) so the storefront can render text, images, videos, or documents.
Requires a Fire spark access token obtained through token
exchange.
Path parameters
| Parameter | Required | Description |
|---|---|---|
name | Yes | Reserved block name. Lowercase letters, numbers, and hyphens only (e.g. legal-tos). Unique per merchant and env. |
Request
curl "https://firespark.cloud/api/storefront/v1/cms/blocks/legal-tos" \
-H "Authorization: Bearer ACCESS_TOKEN"
Response
The response wraps a single block indata.
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "home-hero",
"status": "ACTIVE",
"items": [
{
"id": "11111111-1111-1111-1111-111111111111",
"type": "TEXT",
"key": "headline",
"label": "Headline",
"text": "Order ahead"
},
{
"id": "22222222-2222-2222-2222-222222222222",
"type": "LIST",
"key": "banners",
"label": "Banners",
"item_type": "IMAGE",
"items": [
{
"id": "33333333-3333-3333-3333-333333333333",
"type": "IMAGE",
"url": "https://example.com/banner-1.jpg",
"alt": "Summer deal"
},
{
"id": "44444444-4444-4444-4444-444444444444",
"type": "IMAGE",
"url": "https://example.com/banner-2.jpg",
"alt": "New menu"
}
]
}
]
}
}
items.find(i => i.key === "banners"). When type is LIST, render items in order.
Limits
| Constraint | Value |
|---|---|
| Top-level items per block | 1–25 |
Entries per LIST | 1–10 |
| Image | ≤ 5 MB |
| Video | ≤ 50 MB |
| Document | ≤ 10 MB |
Error responses
| Status | Description |
|---|---|
401 | Missing or invalid access token. |
404 | No ACTIVE block found with the given name. |